package com.myrule;

import com.netflix.loadbalancer.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){
        return new RandomRule();//定义为随机
//        return new RetryRule(); //重试
//        return new WeightedResponseTimeRule(); //权重
//        return new BestAvailableRule(); //最快
//        return new  AvailabilityFilteringRule();//故障

    }
}
